<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>登录 - 学生能力分管理系统</title>
    <style>
        /* 极简风格 CSS */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
            line-height: 1.6;
            color: #1f2937;
            background-color: #f9fafb;
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
        }

        .container {
            width: 100%;
            max-width: 400px;
            padding: 24px;
        }

        .login-form {
            background-color: white;
            padding: 32px;
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        }

        h1 {
            text-align: center;
            margin-bottom: 24px;
            font-size: 1.8rem;
            font-weight: 600;
            color: #1f2937;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            margin-bottom: 6px;
            font-weight: 500;
            color: #374151;
        }

        .form-group input {
            width: 100%;
            padding: 10px 12px;
            border: 1px solid #d1d5db;
            border-radius: 4px;
            font-size: 15px;
            transition: border-color 0.2s ease;
        }

        .form-group input:focus {
            outline: none;
            border-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }

        .error-message {
            color: #ef4444;
            font-size: 0.875rem;
            margin-top: 4px;
        }

        .submit-button {
            width: 100%;
            padding: 10px;
            background-color: #3b82f6;
            color: white;
            border: none;
            border-radius: 4px;
            font-size: 16px;
            font-weight: 500;
            cursor: pointer;
            transition: background-color 0.2s ease;
        }

        .submit-button:hover {
            background-color: #2563eb;
        }

        .footer-text {
            text-align: center;
            margin-top: 16px;
            color: #6b7280;
            font-size: 0.875rem;
        }

        @media (max-width: 768px) {
            .container {
                padding: 16px;
            }
            
            .login-form {
                padding: 24px;
            }
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="login-form">
            <h1>学生能力分管理系统</h1>
            <form method="POST" action="/login">
                <div class="form-group">
                    <label for="username">用户名</label>
                    <input type="text" id="username" name="username" required>
                </div>
                <div class="form-group">
                    <label for="password">密码</label>
                    <input type="password" id="password" name="password" required>
                </div>
                {% if error %}
                <div class="form-group">
                    <div class="error-message">{{ error }}</div>
                </div>
                {% endif %}
                <div class="form-group">
                    <button type="submit" class="submit-button">登录</button>
                </div>
            </form>
            <div class="footer-text">
                欢迎使用学生能力分管理系统
            </div>
        </div>
    </div>
</body>

</html>